var express = require('express');
var path = require('path');
var app = express();

//设置port端口
var port = process.env.PORT || 3000;
app.listen(port);
console.log("easylife started on port" + port); 

// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'ejs');

app.get('/', function(req, res) {
   res.render('index', { title: 'Express' });
});

// app.get('/add', function(req, res) {
//    res.render('add', { title: 'Express' });
// });

module.exports = app;